﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
using Medical_Store_Billing.Business_Login_Layer;

namespace Medical_Store_Billing.Report
{
    public partial class FormReport1 : Form
    {
        SanphamBLL m_sanpham;
        public FormReport1()
        {
            InitializeComponent();
        }

        private void FormReport1_Load(object sender, EventArgs e)
        {

            this.reportViewer1.RefreshReport();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            m_sanpham = new SanphamBLL();
            string nguoilap = txtnguoilap.Text;
            IList<ReportParameter> param = new List<ReportParameter>();

            param.Add(new ReportParameter("nguoilap", nguoilap));
            reportViewer1.LocalReport.SetParameters(param);
            sanphamclassBindingSource.DataSource = m_sanpham.Laydssanpham1();
            reportViewer1.RefreshReport();
        }
    }
}
